# -*- coding:utf-8 -*-
from rest_framework import serializers

from .models import RescueTask


class RescueTaskListSerializer(serializers.ModelSerializer):

    class Meta:
        model = RescueTask
        fields = ('id', 'property_company_name', 'rescue_state', 'task_create_time', 'warn_bill_coordinates')


class RescueTaskRetrieveSerializer(serializers.ModelSerializer):

    class Meta:
        model = RescueTask
        fields = ('id', 'property_company_name', 'task_creator_name', 'task_creator_phone', 'elevator_code',
                  'terminal_name', 'warn_bill_time', 'task_depict', 'rescue_depict', 'rescue_state',
                  'warn_bill_coordinates')


class RescueTaskSerializer(serializers.ModelSerializer):

    class Meta:
        model = RescueTask
        fields = ('id', 'rescue_state', 'lng', 'lat', 'rescuer_state', 'rescue_state')
